package constant;

import java.util.regex.Pattern;

/**
 *
 * @Description 公共常量
 * @Author admin
 * @Date 2024-12-25 12:36
 */
public class Constants {


    public static final Integer REQ_PARAMETER_LENGTH = 3;
    public static final Integer ZERO = 0;
    public static final Integer COUNT_LIMIT = 3;
    public static final Integer ERROR_CODE = 400;
    public static final Integer INVALID_CODE = 401;
    public static final String ERROR_FORMAT = "Invalid request format";
    public static final Integer TEN_MINUTES = 10 * 60 * 1000;
    public static final String SESSION_KEY = "sessionkey";


    public static final String COMMA_STR = ",";
    public static final String BACKSLASH_STR = "/";
    public static final String EQUAL_STR = "=";
    public static final String GET = "GET";
    public static final String POST = "POST";

    // 用于匹配获取会话信息的请求路径
    public static final Pattern GET_SESSION_PATH_PATTERN = Pattern.compile("^/([0-9]+)/session$");
    // 用于匹配投注请求的路径
    public static final Pattern STAKE_PATH_PATTERN = Pattern.compile("^/([0-9]+)/stake$");
    // 用于匹配获取最高投注额的请求路径
    public static final Pattern HIGH_STAKE_PATH_PATTERN = Pattern.compile("^/([0-9]+)/highstakes$");
}
